package me.zzp.domain;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

/**
 * @author zhangzepeng
 */
@Getter
@Setter
@NoArgsConstructor
@AllArgsConstructor
public class Order {

    public enum Direction {
        asc,
        desc
    }

    private String property = "";
    private Direction direction = Direction.asc;

    @Override
    public String toString() {
        return String.format(" %s %s", property, direction == Direction.desc? "desc": "asc");
    }
}
